package analiseSemantica;

public class PostFixExpr {

	Expr exprRef = null;
	ArgumentList argumentLisRef = null;
	int cat;
	String id;
	Constant constante;
	public int line;

	public PostFixExpr(int cat) {
		this.cat = cat;
	}

	public PostFixExpr(Object ob, int cat) {
		this.cat = cat;
		if (ob instanceof Constant) {
			this.constante = (Constant) ob;
		} else if (ob instanceof Expr) {
			this.exprRef = (Expr) ob;
		}
	}

	public PostFixExpr(String id, int cat) {
		this.cat = cat;
		this.id = id;
	}

	public PostFixExpr(String id, int cat, Object ob) {
		this.id = id;
		this.cat = cat;

		if (ob instanceof ArgumentList)
			this.argumentLisRef = (ArgumentList) ob;

		if (ob instanceof Expr)
			this.exprRef = (Expr) ob;

	}

	public ArgumentList getArgumentLisRef() {
		return argumentLisRef;
	}

	public void setArgumentLisRef(ArgumentList argumentLisRef) {
		this.argumentLisRef = argumentLisRef;
	}

	public int getCat() {
		return cat;
	}

	public void setCat(int cat) {
		this.cat = cat;
	}

	public Constant getConstante() {
		return constante;
	}

	public void setConstante(Constant constante) {
		this.constante = constante;
	}

	public Expr getExprRef() {
		return exprRef;
	}

	public void setExprRef(Expr exprRef) {
		this.exprRef = exprRef;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

}
